package com.cium.aqie.dsl

import java.io.File

/**
 * @Function:
 * @Author: aqie
 * @Date: 2019/9/2 15:01
 */
fun main(args: Array<String>) {
    // generateHtml()
    writeFile2("aqie.txt111")
}

fun writeFile2(string: String){
    val file = File("D:\\gitee\\kotlin\\baseKotlin\\src\\main\\kotlin\\com\\cium\\aqie\\dsl\\aqie.txt")
    file.writeText(string)
}
fun writeFile() {
    val currentDir = System.getProperty("user.dir") + "\\out"
    val file = File(currentDir, "hehe.txt")
    file.writeText("呵呵呵哈哈哈")
    println(file.readText())
}
private fun generateHtml() {
    html {
        "id"("HtmlId")
        "head"{
            "id"("headId")
        }
        body {
            id = "bodyId"
            `class` = "bodyClass"

            "a"{
                "href"("https://www.kotliner.cn")
                +"Kotlin 中文博客"
            }
        }

        "div"{

        }


    }.render().let(::println)
}